<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>

<!--<link th:href="@{/ajax/libs/webuploader/webuploader.css}" rel="stylesheet"/>
<link th:href="@{/css/demo/webuploader-demo.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>-->
<link th:href="@{/css/plugins/dropzone/basic.css}" rel="stylesheet"/>
<link th:href="@{/css/plugins/dropzone/dropzone.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css?v=4.1.0}" rel="stylesheet">
<body class="white-bg">
<div class="ibox-content">
    <form action="" method="post" class="form-horizontal m" id="form-ordersDetail-deleteRemark" th:object="${ordersDetail}">
        <input id="id" name="id" th:field="*{id}"  type="hidden">
        <div class="form-horizontal m">

           <!-- <div class="form-group">
                <label class="col-sm-3 control-label">Order ID：</label>
                <div class="col-sm-9">
                    <input type="text" readonly class="form-control" th:field="*{orderID}" id="orderID" name="orderID">
                </div>
            </div>-->

            <div class="form-group">
                <label class="col-sm-3 control-label">Reasons for deletion：</label>
                <div class="select-list col-sm-9">
                    <ul>
                        <li>
                            <select id="deleteReason" class="reset_select">
                                <option value="已无剩余库存">已无剩余库存</option>
                                <option value="找不到了">找不到了</option>
                                <option value="已损坏">已损坏</option>
                                <option value="废单">废单</option>
                            </select>
                        </li>
                    </ul>
                </div>
            </div>


            <div class="form-group" style="margin-top: 50px">
                <div class="col-sm-12 col-sm-offset-3">
                    <button type="submit" class="btn btn-primary" data-loading-text="Loading..." >submit</button><!--  onclick="upload()" -->
                    <button onclick="$.modal.close()" class="btn btn-danger" type="button">close</button>
                </div>
            </div>
        </div>

    </form>

</div>

<div th:include="include::footer"></div>
<script type="text/javascript">
    $("#form-ordersDetail-deleteRemark").validate({
        submitHandler: function(form) {
            //提交删除备注
                $.ajax({
                    async : true,
                    cache : true,
                    dataType: 'json',
                    url : ctx+"module/ordersDetail/deleteRemark",
                    type : "POST",
                    data : {
                        id:$("#id").val(),
                        bz:$("#deleteReason").val(),
                        isDel:1,
                    },
                    error : function(request) {
                        $.modal.alertError("system error");
                    },
                    success : function(data) {
                        $.operate.saveSuccess(data);
                    },complete: function(XMLHttpRequest, textStatus) {
                    }
                });
        }
    });

</script>
</body>
</html>
